
package cn.tedu.apps_system.pojo.dto;

import lombok.Data;
import javax.validation.constraints.*;

@Data
public class ProductAddDTO {
    @NotNull(message = "商家ID不能为空")
    private Long merchantId;

    @NotBlank(message = "商品名称不能为空")
    private String name;

    private String description;

    @NotNull(message = "价格不能为空")
    @DecimalMin(value = "0.01", message = "价格必须大于0")
    private Double price;

    @NotNull(message = "库存不能为空")
    @Min(value = 0, message = "库存不能小于0")
    private Integer stock;

    @NotBlank(message = "单位不能为空")
    private String unit;

    private String origin;

    private String imageUrls;
}